import * as React from "react";
declare namespace NetRequest {
    interface ListResult {
        code?: number;
        data?: {
            list?: Array<any>;
            id?: string;
        };
        msg?: string;
    }
}

export interface MapTopic {
    id?: string;
    name?: string;
    pid?: string;
    sourceId?: string;
    geoJSON?: string;
    icon?: string;
    styleConfig?: string;
    year?: string;
    pbfConfig?: string;
    layerType?: 'topic' | 'shape' | 'line' | 'symbol';
    createUserName?: string;
    remark?: string;
    sort?: string;
    children?: MapTopic[];
    title?: string;
    key?: string;
    layerColor?: string;
}

export interface SmartMapMarker {
    id?: string;
}

export interface SmartMapProps {
    initMapCenter?: number[];
    initMapZoom?: number;
    mapMountingRootId?: string;
    tdt_map_token?: string;
    mapbox_token?: string;
    uploadActionUrl?: string;
    addMapLayerPromiseFunc?: (params: any) => Promise<NetRequest.ListResult>;
    editMapLayerPromiseFunc?: (params: any) => Promise<NetRequest.ListResult>;
    deleteMapLayerPromiseFunc?: (params: any) => Promise<NetRequest.ListResult>;
    queryMapLayerPromiseFunc?: (params: any) => Promise<NetRequest.ListResult>;
    pageParamsTag?: 'pageIndex' | 'page';
    onMapLoaded?: () => any;
    onPressMarker?: (marker: SmartMapMarker) => any;
    defaultMapLayerPid?: any;
}

export interface MapBoxInstance {
}

export interface SmartMapInstance {
    setMapMarkerList: (markerList: SmartMapMarker[]) => void;
    setMapZoom: (zoom: number) => void;
    setMapCenter: (zoom: number[]) => void;
    getMapBoxInstance: () => MapBoxInstance;
}

export interface MapStatus {
    center?: number[];
    zoom?: number;
    pitch?: number;
    bearing?: number;
}

export interface CompositionSmartMap<P> extends React.FC<P> {
}

declare const SmartMap: CompositionSmartMap<SmartMapProps>;
export default SmartMap;
